import request from '@/utils/request'

// 查询盘库作业列表
export function listTask(query) {
  return request({
    url: '/inventory/task/list',
    method: 'get',
    params: query
  })
}

// 查询盘库作业详细
export function getTask(checkGoodsId) {
  return request({
    url: '/inventory/task/' + checkGoodsId,
    method: 'get'
  })
}

// 新增盘库作业
export function addTask(data) {
  return request({
    url: '/inventory/task',
    method: 'post',
    data: data
  })
}

// 修改盘库作业
export function updateTask(data) {
  return request({
    url: '/inventory/task',
    method: 'put',
    data: data
  })
}

// 删除盘库作业
export function delTask(checkGoodsId) {
  return request({
    url: '/inventory/task/' + checkGoodsId,
    method: 'delete'
  })
}

// 修改出库状态
export function confirmCheckGoods(data) {
  return request({
    url: '/inventory/task/confirm',
    method: 'put',
    data: data
  })
}

